home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: PageStream_Export 1.1
- **
- ** Copyright © 1996 by Volkmar Funke
- **
- ** This Arexx Script exports a picture to Pagestream3.
- ** Both programs must already be running.
- ** Script has been tested with PageStream3.2 and ImageEngineer 3.4.
- **
- ** [english translation by Andreas R. Kleinert]
- */
-
- OPTIONS RESULTS
- TEMP_FILE = 't:Image_from_IE'
- TRACE OFF
-
- /* Make sure, that the ARexx script is supported */
-
- if ~show('L','rexxsupport.library') then
- call addlib('rexxsupport.library',0,-30)
- if ~show('L','softlogik:libs/slarexxsupport.library') then
- call addlib('softlogik:libs/slarexxsupport.library', 0, -30)
-
- if ~show(P,'PAGESTREAM') then do
- 'REQUEST' '"PageStream not running !!"' '" OK "'
- EXIT
- end
-
- 'SAVE_DATA' arg(1) '"'||TEMP_FILE||'"' '"ILBM CmpByteRun1"' /*Save image*/
- if (RC ~= 0) then do
- 'REQUEST' '"Could not create temporary file"' '" OK "'
- EXIT
- end
-
- /* Requester has been added, so that the image won't be lost when
- ** turning the computer off !!
- */
-
- 'REQUEST " !!! ATTENTION !!!' D2C(10),
- ' ' D2C(10),
- 'Picture has only been saved temporarily !" " OK "'
-
- ADDRESS 'PAGESTREAM'
-
- /* Passing the graphics, error if no document opened */
-
- 'refresh wait' /* PageStream freezes screen refresh -> ctrl f10 */
-
- ScreentoFront
-
- placegraphic FILE '"'||TEMP_FILE||'"'
- if rc~=0 then do
-
- ADDRESS 'IMAGEENGINEER'
- IE_TO_FRONT
- REQUEST '"No document opened in PageStream !"' ' "OK" '
- signal cancel
- end
-
- 'refresh continue'
-
- EXIT
-
- CANCEL:
-
- ADDRESS COMMAND
- 'run >nil: delete' '"'||TEMP_FILE||'"'
-
- ADDRESS 'PAGESTREAM' /* Must be done, since otherwise it would not */
- 'refresh continue' /* be displayed when a new document is opened */
- EXIT
-